package pe.edu.cibertec.user.action;

import org.springframework.beans.factory.annotation.Autowired;
import pe.edu.cibertec.service.UserService;
import pe.edu.cibertec.user.bo.UserBo;

public class UserSpringAction{

    @Autowired
    private UserService userService;

    //DI via Spring
    private UserBo userBo;

    public UserBo getUserBo() {
            return userBo;
    }

    public void setUserBo(UserBo userBo) {
            this.userBo = userBo;
    }

    public String execute() throws Exception {

            userBo.printUser();
            
            userService.list();

            return "success";

    }
}